Check column types on the new model, and check them all. (#159389, Olivier
authorMatthias Clasen <mclasen@redhat.com>
Fri, 26 Nov 2004 05:51:32 +0000 (05:51 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 26 Nov 2004 05:51:32 +0000 (05:51 +0000)
2004-11-26  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
new model, and check them all.  (#159389, Olivier Andrieu)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkiconview.c

index af9a19f04117ce15282b332683a352350ff4d451..c6c2600a14e6ee6536b6b536b1d761a4cb4605df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-11-26  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
+       new model, and check them all.  (#159389, Olivier Andrieu)
+
        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display): 
        Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg) 
 
index af9a19f04117ce15282b332683a352350ff4d451..c6c2600a14e6ee6536b6b536b1d761a4cb4605df 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-26  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
+       new model, and check them all.  (#159389, Olivier Andrieu)
+
        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display): 
        Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg) 
 
index af9a19f04117ce15282b332683a352350ff4d451..c6c2600a14e6ee6536b6b536b1d761a4cb4605df 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-26  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
+       new model, and check them all.  (#159389, Olivier Andrieu)
+
        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display): 
        Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg) 
 
index af9a19f04117ce15282b332683a352350ff4d451..c6c2600a14e6ee6536b6b536b1d761a4cb4605df 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-26  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
+       new model, and check them all.  (#159389, Olivier Andrieu)
+
        * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display): 
        Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg) 
 
index 0d9ec1cb96adbc0352c47089404638a769e8fb37..9892eaaa6ac6c20fa6e3acc9a572a25b01b21372 100644 (file)
@@ -2955,24 +2955,32 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
 
   if (model)
     {
-      GType pixbuf_column_type, text_column_type;
+      GType column_type;
       
       g_return_if_fail (gtk_tree_model_get_flags (model) & GTK_TREE_MODEL_LIST_ONLY);
 
       if (icon_view->priv->pixbuf_column != -1)
        {
-         pixbuf_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
-                                                              icon_view->priv->pixbuf_column);   
+         column_type = gtk_tree_model_get_column_type (model,
+                                                       icon_view->priv->pixbuf_column);          
 
-         g_return_if_fail (pixbuf_column_type == GDK_TYPE_PIXBUF);
+         g_return_if_fail (column_type == GDK_TYPE_PIXBUF);
        }
 
       if (icon_view->priv->text_column != -1)
        {
-         text_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
-                                                            icon_view->priv->pixbuf_column);     
+         column_type = gtk_tree_model_get_column_type (model,
+                                                       icon_view->priv->text_column);    
+
+         g_return_if_fail (column_type == G_TYPE_STRING);
+       }
 
-         g_return_if_fail (text_column_type == G_TYPE_STRING);
+      if (icon_view->priv->markup_column != -1)
+       {
+         column_type = gtk_tree_model_get_column_type (model,
+                                                       icon_view->priv->markup_column);          
+
+         g_return_if_fail (column_type == G_TYPE_STRING);
        }
       
     }